<template>
	<view class="content" style="height: 100%;">
		<view style="margin: 10upx;background: white;padding: 10upx 20upx;border-radius: 20upx;" @tap="fous(39.068815, 117.27252)">天津科技大学</view>
		<view style="margin: 10upx;background: white;padding: 10upx 20upx;border-radius: 20upx;" @tap="fous(39.087929, 117.705323)">天津科技大学(泰达校区)</view>
		<map :latitude="latitude" :longitude="longitude" :markers="markers" :scale="scale"></map>
	</view>
</template>
<script>
export default {
	data() {
		return {
			latitude: 39.068815,
			longitude: 117.27252,
			scale: 15,
			markers: [
				// {
				// 	id: 2123,
				// 	latitude: 39.087929,
				// 	longitude: 117.705323,
				// 	title:'天津科技大学(泰达校区)',
				// 	iconPath: '../../static/img/location.png'
				// },
				{
					id: 1,
					latitude: 39.068815,
					longitude: 117.27252,
					iconPath: '../../static/img/location.png'
				}
			]
		};
	},
	methods: {
		fous(x, y) {
			this.latitude = x;
			this.longitude = y;
			this.markers = [
				{
					id: 1,
					latitude: x,
					longitude: y,
					iconPath: '../../static/img/location.png'
				}
			];
		}
	}
};
</script>
<style>
map {
	width: 100%;
	height: 700upx;
	margin-top: 10upx;
}
</style>
